Jump to content
thirty bees forum
  • 0

Question

Posted

I have some links in the footer. One should go to an external page and I want it to open in a new tab. So I wrote it like this www.example.com/index.php target="_blank" The links are saved in a table The target attribute is shown when I hover the link but it does open in the same window when I click on it. Is there some other way to do this else than the obvious, right click

16 answers to this question

Recommended Posts

  • 0
Posted

You have html error in it. You mess up with quote sign (").

Yours: <a href="https://webadmin-lin.demo.plesk.com:8443/smb target =&quot;_blank&quot;" title="Plesk Control Panel">Plesk Control Panel</a>

Correct: <a href="https://webadmin-lin.demo.plesk.com:8443/smb" target ="_blank" title="Plesk Control Panel">Plesk Control Panel</a>

  • 0
Posted

This is the code in the tpl. To me it looks if a target is hardcoded here, all links will open in a new tab. Solution for that is to only place links here that should open outside the shop

            <ul id="footercustom_link_informations">
                <li class="footercustom_link_title footercustom_title">{$blocktitle1|escape:'html':'UTF-8'}</li>
                {foreach from=$blocks1 item=block name=loop}
                    <li>{if $block.link}<a href="{$block.link|escape:'html':'UTF-8'}" title="{$block.title|escape:'html':'UTF-8'}">{/if}{if $block.title}{$block.title|escape:'html':'UTF-8'}{/if}{if $block.link}</a>{/if}</li>
                {/foreach}
            </ul>
  • 0
Posted

Me? 62 y o fart. I doubt it. I probably have to ask someone about where to place the target code ;-) I often use trial and error but I have just broken one shop so I must admit my limitations

  • 0
Posted

@Havouza said in How create a link like this?:

This is the code in the tpl. To me it looks if a target is hardcoded here, all links will open in a new tab. Solution for that is to only place links here that should open outside the shop

          <ul id="footercustom_link_informations">
              <li class="footercustom_link_title footercustom_title">{$blocktitle1|escape:'html':'UTF-8'}</li>
              {foreach from=$blocks1 item=block name=loop}
                  <li>{if $block.link}<a href="{$block.link|escape:'html':'UTF-8'}" title="{$block.title|escape:'html':'UTF-8'}">{/if}{if $block.title}{$block.title|escape:'html':'UTF-8'}{/if}{if $block.link}</a>{/if}</li>
              {/foreach}
          </ul>

Yeah you could solve it in your tpl file. The solution which comes to my mind is a bit ugly. But you could use something like: {if $block.id==anynumber}target="_blank"{/if}

I don't use this module, so I don't know if you have access to the id...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...